package com.web.hotel.po.mapper;

import com.web.hotel.po.City;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * Created by chen on 2017/3/10.
 */
public class CityMapper implements RowMapper<City> {
    public City mapRow(ResultSet resultSet, int i) throws SQLException {
        City city = new City();
        city.setCityId(resultSet.getInt("cityId"));
        city.setCityName(resultSet.getString("cityName"));
        city.setAreaName(resultSet.getString("areaName"));
        city.setCreateTime(resultSet.getTimestamp("createTime"));
        city.setLandmarks(resultSet.getString("landmarks"));
        city.setCreateUser(resultSet.getString("createUser"));
        return city;
    }
}
